const KoaRouter = require("@koa/router");
const BlogController = require("../controller/blogs.controller.js");
const verifyToken = require("../middleware/verifyToken.js");

const userRouter = new KoaRouter({ prefix: "/blogs" });

userRouter.post("/create", verifyToken, BlogController.create);
userRouter.post("/delete", verifyToken, BlogController.delete);
userRouter.post("/page", verifyToken, BlogController.page);
userRouter.post("/update", verifyToken, BlogController.update);
userRouter.get("/detail/:id", verifyToken, BlogController.detail);

module.exports = userRouter;
